

package jetbrains.buildServer.server.rest.model.changeLog;


import java.util.List;
import java.util.stream.Collectors;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import jetbrains.buildServer.controllers.buildType.tabs.Graph;
import org.jetbrains.annotations.NotNull;

@XmlType(name = "changeLogGraph")
public class ChangeLogGraph {
  private final Graph myGraph;

  public ChangeLogGraph(@NotNull Graph graph) {
    myGraph = graph;
  }

  @XmlElement(name = "columns")
  public List<ChangeLogGraphColumn> getColumns() {
    return myGraph.getColumns().stream().map(ChangeLogGraphColumn::new).collect(Collectors.toList());
  }
}